<?php
/* -------------------------------------------------------------------------------------
* 	ID:						$Id: popup_content.php 300 2013-09-23 10:46:44Z phone.mueller@googlemail.com $
* 	Letzter Stand:			$Revision: 300 $
* 	zuletzt geaendert von:	$Author: siekiera $
* 	Datum:					$Date: 2013-09-23 10:46:44 +0000 (Mon, 23 Sep 2013) $
*
* 	SEO:mercari by Siekiera Media
* 	http://www.seo-mercari.de
*
* 	Copyright (c) since 2011 SEO:mercari
* --------------------------------------------------------------------------------------
* 	based on:
* 	(c) 2000-2001 The Exchange Project  (earlier name of osCommerce)
* 	(c) 2002-2003 osCommerce - www.oscommerce.com
* 	(c) 2003     nextcommerce - www.nextcommerce.org
* 	(c) 2005     xt:Commerce - www.xt-commerce.com
*
* 	Released under the GNU General Public License
* ----------------------------------------------------------------------------------- */

include('includes/application_top.php');

$content = $db->db_query("SELECT
								content_heading,
								content_file,
								content_text
							FROM
								".TABLE_CONTENT_MANAGER."
							WHERE
								content_group = '".(int) $_GET['coID']."'
							AND
								languages_id = '".$_SESSION['languages_id']."'");
?>
<!DOCTYPE html>
<html <?php echo HTML_PARAMS; ?>>
<head>
<meta charset="UTF-8">
<meta http-equiv="Content-Style-Type" content="text/css" />
<title><?php echo $content->fields['content_heading']; ?></title>
<base href="<?php echo (getenv('HTTPS') == 'on' ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>" />
<link rel="stylesheet" type="text/css" href="<?php echo 'templates/'.CURRENT_TEMPLATE.'/css/popup.css'; ?>" />
</head>
<body>
<?php
//echo '<h2>'.$content->fields['content_heading'].'</h2>';
if ($content->fields['content_file'] != '') {
  ob_start();
	if (strpos($content->fields['content_file'], '.txt'))
		echo '<pre>';
	include(DIR_FS_CATALOG.'media/content/'.$content->fields['content_file']);
	if (strpos($content->fields['content_file'], '.txt'))
		echo '</pre>';
	$content = ob_get_contents();	
  ob_end_clean();
	echo utf8_encode($content);	
} else
	echo '<div class="content_body">'.$content->fields['content_text'].'</div>';
?>
</body>
</html>